package com.ww.companyCabinetSystem.dao.impl;

import java.util.List;

import org.springframework.stereotype.Component;

import com.ww.companyCabinetSystem.dao.IIndustrytrendsDao;
import com.ww.companyCabinetSystem.model.bo.MIndustrytrendsBo;
import com.ww.companyCabinetSystem.utils.BeanUtils;
import com.ww.keyIdAutomaticGeneration.factory.KeyIdGenerationFactory;

@Component("industrytrends")
public class IndustrytrendsDaoImpl extends BaseDaoImpl implements
		IIndustrytrendsDao {

	@Override
	public boolean insertIndustrytrends(MIndustrytrendsBo bo) {
		// TODO Auto-generated method stub
		String keyId = KeyIdGenerationFactory.createKeyId();
		bo.setKeyId(keyId);
		BeanUtils.notNull(bo);
		return this.sqlSession.insert("com.ww.companyCabinetSystem.dao.IIndustrytrendsDao.insertIndustrytrends",
				bo) > 0;
	}

	@Override
	public boolean updateIndustrytrends(MIndustrytrendsBo bo) {
		// TODO Auto-generated method stub
		return this.sqlSession.update("com.ww.companyCabinetSystem.dao.IIndustrytrendsDao.updateIndustrytrends", bo)>0;
	}

	@Override
	public List<MIndustrytrendsBo> selectByConfitions(MIndustrytrendsBo bo) {
		// TODO Auto-generated method stub
		return this.sqlSession.selectList("com.ww.companyCabinetSystem.dao.IIndustrytrendsDao.selectIndustrytrends", bo);
	}

}
